<?php

namespace app\admin\controller;


use think\cache\driver\Redis;
use app\common\lib\sms\ClassArr;


class Test
{
    public function redisConnTest()
    {
        $redis = new Redis();//连接本地Redis服务
        if ( $redis->connect('127.0.0.1', 6379) ) {
            echo "Connection to server successfully,Server is running: " . $redis->ping();
            $redis->set("AAA", "hello-world",3600);//存
            echo "从redis获取数据是" . $redis->get("AAA");//取
        } else {
            echo "Connection to server failed";
        }
    }

    public function index()
    {
        $classStats = ClassArr::smsClassStat();
        dump($classStats);

    }

}